package exam;

/**
 * 用户实体类
 * 对应数据库表TB_USER的结构
 */
public class User {
    private String userno;    // 用户编号，主键
    private String userName; // 用户姓名
    private String password; // 密码
    private String job;      // 职位
    private double sal;      // 薪水

    // 无参构造方法
    public User() {}

    // 带参构造方法
    public User(String userno, String userName, String password, String job, double sal) {
        this.userno = userno;
        this.userName = userName;
        this.password = password;
        this.job = job;
        this.sal = sal;
    }

    // Getter和Setter方法
    public String getUserno() {
        return userno;
    }

    public void setUserno(String userno) {
        this.userno = userno;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        this.sal = sal;
    }

    @Override
    public String toString() {
        return "User [userno=" + userno + ", userName=" + userName +
                ", job=" + job + ", sal=" + sal + "]";
    }
}